<script setup lang='ts' name="tabs-item">
import { ref } from 'vue'

import orderItem from '../order-item/index.vue'

const props = withDefaults(defineProps<{
    data?: any
    direction?: string | undefined
    modelValue: boolean
}>(), {
    direction: 'btt',
})
const emits = defineEmits(['update:modelValue'])
const { data, direction } = props
const drawer = ref(false)

function handleClose(done: () => void) {
    emits('update:modelValue', drawer)
    done()
}
</script>

<template>
    <el-drawer v-model="drawer"
               title="订单详情"
               :direction="direction"
               :before-close="handleClose"
    >
        <orderItem :data="data" />
    </el-drawer>
</template>

<style lang="scss" scoped>

</style>
